home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / misc / emu / QDOS1.lha / QLboot / DOCs / QDOS.doc < prev    next >
Text File  |  1996-10-06  |  68KB  |  2,193 lines

  1. Introduction to QDOS
  2. --------------------
  3.  
  4. 1) What is QDOS ?
  5.     QDOS is an operating system designed for small 68000 computers,
  6.     which provides multitasking, a virtual device interface for graphics,
  7.     an easy to program device driver interface, and last but not least
  8.     a highly sophisticated structured and expandable resident command
  9.     language interpreter called "SuperBASIC". Since it was first
  10.     implemented on a computer with only 128K RAM and 48K ROM this
  11.     operating system and its supporting Software and compilers are
  12.     small and very efficient, mostly programmed directly in native
  13.     68000 machinecode. This makes QDOS the ultimate operating system
  14.     for all small computers like for example the Amiga 500 and single
  15.     board controller computers, which can use a  real time operating
  16.     system and the whole support software for their applications.
  17.     QDOS was written by Tony Tebby, who has my deep respect for this.
  18.  
  19. 2) Why QDOS ?
  20.     You may now say, why bothering with QDOS when I have Amiga DOS, which
  21.     provides multitasking too, and can use all the fuzzy features of the
  22.     Amiga without any effort ?
  23.     Okay, you are a real horsetrader. Take for example the pretty serial
  24.     interface, isn't it nice ?  It looks really good, and the preferences
  25.     can be set to any value, but this does not mean, that these values
  26.     have anything to do with what is happening in the head of the Amiga.
  27.     So the handshake lines have a really unsatisfactory live, always
  28.     ignored by the software. Or what's about getting rid of a task which
  29.     has become superfluos, try throwing it in the nice Trashcan of your
  30.     Workbench. But don't tell it to the Guru, he may get angry !
  31.     Enough ? Oh no, There is another bill concerning the rundimentary
  32.     command line interpreter, and this unbelievable stupid Amiga BASIC.
  33.     ...I stop here, because I get headache when I think about it.
  34.     But I can tell you, what are the real advantages:
  35.     1) You can easily intervent in every software and datafiles, since
  36.        QDOS is small and surveyly. QDOS is (at least on the QL) a higly
  37.        reliable operating system, which is hardly crashed
  38.     2) Software development using Superbasic and a compiler is an easy
  39.        interactive process.
  40.        For small problems this is by far the fastest solution
  41.     3) You have a very nice operating system for developing realtime
  42.        applications for single board computers for measurement and
  43.        controll
  44.     4) QDOS is (directliy behind MS-DOS) one of the mostly emulated
  45.        Operating systems. It is implemented for example on the Atari ST,
  46.        now on the Amiga, and on a series of dedicated computers:
  47.        the Sinclair QL, the OPD, the Thor, and the Futura.
  48.  
  49.  
  50. 3) Introduction to SuperBASIC
  51.   *) QDOS special keys
  52.     <Ctrl><F5>     freezes the screen (Hold Screen on normal Terminals)
  53.     <Ctrl><Space>  Break for BASIC programms
  54.     <Ctrl><Alt><7> NMI BASIC Warmstart
  55.  
  56.   a) general structure
  57.     Superbasic programs consists of lines, which start with a positive
  58.     non zero integer, and contain one or more statements, which are
  59.     separated by ":". Identifiers are separated by any non zero
  60.     number of spaces. Identifiers can  consist of letters, numbers
  61.     and the underliner. The length of names is only restricted by
  62.     the amount of typing work, you want to spend. Names  are not
  63.     case sensitive.  Integer Functions and variables are identified
  64.     by a trailing "%", String functions and Variables have a trailing
  65.     "$". String constants can be enclosed in single or double qoute.
  66.     The ":" has the function of a null statement and can therefore
  67.     be the only statment on a line. Comments are introduced by a
  68.     REMark statment, which can be abrieviated by REM.
  69.  
  70.     DATA items are separated by "," where String type items must be
  71.     enclosed in single or double qoute. The DATA statement must be
  72.     the first statement on a line. This line is treated as comment.
  73.     You can read DATA by a READ var[,var2,...] statement. The DATA
  74.     pointer can be restored to any linenumber by a RESTORE [n]
  75.     statement
  76.  
  77.   b) structured loops
  78.     There are only two types of loops, but they have powerfull extras:
  79.     The First one is the FOR loop, which looks like follows:
  80.  
  81.     FOR index=start_expr TO end_expr [STEP expr]
  82.       ....
  83.       [NEXT index]
  84.       ....
  85.       [EXIT index]
  86.       ....
  87.     END FOR index
  88.  
  89.     index must be a floating point variable, the STEP expression
  90.     can be non integer, default is 1.
  91.     FOR loops are enclosed between FOR ... END FOR index.
  92.     In a single line FOR loop, the END FOR terminator can be omitted
  93.     The NEXT keyword jumps back to the FOR statement, whereas
  94.     the EXIT statement forces a jump behind the END FOR statement.
  95.  
  96.     The second loop is the REPeat loop:
  97.     REPeat loop_name
  98.       ....
  99.       [NEXT loop_name]
  100.       ....
  101.       [EXIT loop_name]
  102.       ....
  103.     END REPeat loop_name
  104.  
  105.     You can only escape from the loop with an EXIT statment.
  106.     The NEXT statement will restart the loop at REPeat.
  107.     You normally will test a termination condition at the
  108.     start (WHILE) or at the end (REPEAT UNTIL) and EXIT.
  109.     Example:
  110. 100    REPeat Read_data
  111. 110      IF EOF(#3) THEN EXIT Read_data
  112. 120      INPUT #3,a$
  113. 130      PRINT a$
  114. 140    END REPeat Read_data
  115.  
  116.   c) IF ... THEN ... ELSE ... END IF
  117.     Single line IF statements do not need to be terminated with END IF.
  118.     The operators AND,OR,XOR are logical, not bitwise !
  119.     For Integer bitwise operators use &&,||,^^.
  120.  
  121.   d) selecting data (CASE OF,  SWITCH ON)
  122.     Select variables must be Floating point type, and no formal
  123.     parameters are allowed. The format then is:
  124.  
  125.        SELect ON Sel_var
  126.      =1        : ...
  127.      =3,6,8     : ...
  128.      =10 TO 99  : ...
  129.      =REMAINDER : ...
  130.        END SELect
  131.  
  132.   e) procedures, functions and parameters
  133.     PROCedures and FuNctions can be ordered top down or bottom up
  134.     or free style. They can be recursive, Parameters can be modified.
  135.     The definition is introduced with
  136.  
  137.     DEFine PROCedure name[(par1,par2...)]
  138.       or
  139.     DEFine FuNction name[(par1,par2...)]
  140.  
  141.     The formal parameters do not have a type !
  142.     String FuNctions must end with a '$', integer FuNctions with '%'.
  143.     The next line after the Definition contains the LOCal variable list
  144.     which is introduced by the keyword LOCal. You  should not try to
  145.     declare more than 9 local variables, since this may confuse the
  146.     Interpreter. Arrays can be dimensioned at declaration time:
  147.  
  148.     LOCal var1,var2$,var3(100,10)
  149.  
  150.     FuNctions return theier result using the RETurn statement.
  151.     The RETurn statement can be used without  any argument to
  152.     escape from a procedure.
  153.  
  154.     RETurn result
  155.  
  156.     The FuNction and PROCedure is terminated using the END DEFine
  157.     statement:
  158.  
  159.     END DEFine name
  160.  
  161.     Example:
  162.  
  163. 100    DEFine FuNction FAK(n)
  164. 110    LOCal m
  165. 120    IF n=0 THEN
  166. 130       m=1
  167. 140    ELSE
  168. 150       m=n-1 : m=n*FAK(m)
  169. 160    END IF
  170. 170    RETurn m
  171. 180    END DEFine FAK
  172.  
  173.   f) !!! string handling and array slicing !!!
  174.     String handling on Superbasic is very different from any other
  175.     language !
  176.     A string expression can consist of
  177.      String constants enclosed in single quote or double quote
  178.      String variables terminated with '$'
  179.      String slices which consist of the name, and a range: A$(3 TO 6)
  180.      String functions
  181.      and the concanation operator, which is the ampersand: '&'
  182.     Array and string slices need not to specify start and end:
  183.      A(  TO 8)          will start with the first element
  184.      A(3 TO)          will end with the last element.
  185.     this can be wrong for strings, since the number of elements is not
  186.     allways the length of a string !
  187.     arrays and array slices can be passed to procedures, but
  188.     slices are considered as expressions, and can therefore not
  189.     return values from a procedure.
  190.     INSTR is implemented as operator , not as Function !
  191.     Example: N= "TEST" INSTR A$     return the position of "TEST"
  192.     Strings can have a length of up to 32767 characters.
  193.     Strings can be Dimensioned. If you need an Array of Strings, the
  194.     last index specifies the length of the string
  195.  
  196.   g) error  processing
  197.     There are different kinds of error processing for SUPERBASIC.
  198.     The official one only works in the pure interpreter mode:
  199.  
  200.     10 WHEN ERROR
  201.     20   PRINT 'sorry, there was an error:',ERNUM,'at ',ERLIN
  202.     30 END WHEN
  203.  
  204.     or for debuging purposes:
  205.  
  206.     10 WHEN a=123
  207.     20   PRINT 'The Value has reached the Limit !'
  208.     30 END WHEN
  209.  
  210.     The WHEN statements must have been executed once, before they
  211.     become active.
  212.     If You compile programs with the Qliberator, you should use
  213.     the QERR_ON 'function' , QERR_OFF 'function' procedure, which
  214.     traps error returns and set a flag which can be read with Q_ERR.
  215.  
  216.   h) interfacing to assembler
  217.     This is probably one of the biggest advantages of SUPERBASIC over
  218.     nearly all other BASIC interpreters I know.
  219.     You can easily add new functions and procedures to the interpreter,
  220.     which then will behave as if they have ever belonged to it.
  221.     The following VECTORED UTILITIES are designed to assist you:
  222.     BP.INIT    $110  A1=pointer to definition list
  223.       initialize procedures and functions
  224.     CA.GTINT   $112  A1=pointer to stack , A3/A5=first/last parameter
  225.       get any number of integer parameters from BASIC to stack
  226.     CA.GTFP    $114  as above
  227.       get floating point (6 bytes !)
  228.     CA.GTSTR   $116  as above
  229.       get string
  230.     CA.GTLIN   $118  as above
  231.       get long integer (4 byte)
  232.     BV.CHRIX   $11A  D1.L=number of bytes
  233.       allocate space on arithmetic stack
  234.     BP.LET       $120  A3=pointer to name table entry
  235.       return parameter value to BASIC
  236.     The error is returned as negative Number in D0
  237.     A normal RTS instruction should be used to return to BASIC.
  238.     A6 should never be changed, since this is used as pointer to
  239.     the BASIC memory area.
  240.     For more Details have a look at some assembler sources.
  241.  
  242.   i) command summary of functions and procedures
  243.        *1 = T.Tebby toolkit 2
  244.        *2 = Turbo Toolkit (supplied with TURBO basic compiler)
  245.        *3 = Qliberator toolkit
  246.        *4 = any other toolkit or program
  247.  
  248.        _R grafic commands refer to the last plotted point as origin.
  249.        Graphic coordinates refer to a virtual device with non integer
  250.        coordinates, which can be scaled using SCALE.
  251.        This makes it possible  (in principle) to output graphics
  252.        on any device with maximum resolution. You should not
  253.        wonder about the strange factor between X and Y coordinates,
  254.        this is the monitor X/Y relation, which makes circles round.
  255.  
  256.        PIXEL coordinates are physical coordinates (X=0..511, Y=0..255)
  257.  
  258.        With the T.Tebby Toolkit 2 #n is almost synonym with \filename,
  259.        which will act on the file directly, instead on a channel.
  260.        Job handling requires the name as string or the ID in the
  261.        form Number,Tag.
  262.  
  263. ABS(F)        returns positive number
  264. ACOS(F)     returns inverse of cosine
  265. ACOT(F)     returns inverse of cotangent
  266. ADATE n     advance date in seconds (+ or -)
  267. AJOB ID% or NAME$, priority%
  268.         *1    activates a job
  269. ALARM h%,m%
  270.         *1    can not work on the amiga, since sound is not emulated
  271. ALCHP(n)    *1    allocates space (n bytes) in the common heap area
  272.         and returns the address of the first byte to use
  273. ALLOCATION  ?    sometimes I am wondering myself
  274. ALTKEY Key$,String$
  275.         *1    if you type the key in key$ together with the <ALT> key
  276.         afterwards, the String in String$ will be displayed.
  277. ARC [#n,]x,y TO x1,y1,angle
  278.         draw an arc between x,y and x1,y1
  279. ARC_R        same as ARC, but uses relative coordinates
  280. ASIN(F)     returns the inverse sine
  281. AT [#n,]y%,x%    set cursorusing character coordinates
  282. ATAN(F)     returns the inverse tangent
  283. AUTO n,i    old fashioned basic programming tool
  284. BASIC_B%    *2    ??????????????????
  285. BASIC_F     *2
  286. BASIC_INDEX%
  287.         *2
  288. BASIC_L     *2
  289. BASIC_NAME$
  290.         *2
  291. BASIC_POINTER
  292.         *2
  293. BASIC_TYPE%
  294.         *2
  295. BASIC_W%    *2    ???????????????????
  296. BAUD n%     set baudrate for serial transmission
  297. BEEP any number of parameters
  298.         can not work on the amiga, since sound is not emulated
  299. BEEPING     will return nonsense
  300. BGET #n[\ptr],list_of_vars
  301.         *1    get bytes from a file, refering to a pointer
  302. BICOP        *my own toolkit, makes a hardcopy sideways
  303. BIN(str$)   *1    binary conversion
  304. BIN$(n,bits)
  305.         *1    returns a string containing binary representation of n
  306. BLOCK [#n,]x,y,bx,by,c
  307.         draws a rectangle at x,y in colour c , PIXEL coordinates !
  308. BLOOK(a$,adr)
  309.         *my own toolkit, searches  for a  string in memory
  310. BMOVE start,end,to
  311.         *my own toolkit, memory block move
  312. BORDER [#n,]w,c
  313.         gives a border with thickness w in colour c
  314. BPUT #n[\ptr],list_of_vars
  315.         *1    but bytes into a  file, refering to a pointer
  316. CALL PC[,D1,D2,D3,D4,D5,D6,D7,A0,A1,A2,A3,A4,A5]
  317.         call a machine code programm
  318. CATNAP        *2    ?????
  319. CDEC$(value,field,ndp)
  320.         *1    currency conversion
  321. CHANNEL_ID(#n)
  322.         *2    returns QDOS channel ID for basic channel #n
  323. CHARGE        *2    should run the TURBO compiler. Crash system !
  324. CHAR_INC [#n,]x_inc,y_innc
  325.         *1    set character spacing
  326. CHAR_USE [#n,]adr1,adr2
  327.         *1    set address of new character font (first and second)
  328. CHR$(n%)    returns character with ascii number n
  329. CIRCLE [#n,]x,y,r[,eccentricity,angle]
  330.         draw a circle or ellipse in graphic coordinates
  331. CIRCLE_R [#n],x,y,r
  332.         draw circle using relative origin
  333. CLCHP        *1    clear all common heap allocations for BASIC
  334. CLEAR        clear all variables, tidy BASIC stack
  335. CLOCK [#n,][string$]
  336.         *1    displays a clock (try %Y %D %H %M %S)
  337. CLOSE [#n] [*1] close a[ll] channel[s]
  338. CLR_SEALST  *RK00 don't use search list RAM1_, RAM2_, FLP1_, FLP2_
  339. CLS [#n,][o%]    clears all or part of a window.
  340.         o%= 0: whole screen
  341.             1: top excluding cursor line
  342.             2: bottom excluding cursor line
  343.             3: whole cursor line
  344.             4: right end of cursor line, including cursor
  345. CODE(c$)    returns ASCII representation of character
  346. COL(x512,y256)
  347.         *my own toolkit.
  348.         Returns colour of pixel using pixel coordinates
  349. COMMAND_LINE
  350.         *2    for compiler only
  351. COMPILED    *2    for compiler only
  352. CONNECT     *2    ???????????????????
  353. CONTINUE    if a program has been stopped using STOP or <break>
  354. COPY file1$ TO file2$
  355.        [*1] copy a file. With TK2 default devices are provided
  356. COPY_H file1$,file2$
  357.         *1    copy file with header
  358. COPY_N file1$ TO file2$
  359.        [*1] copy file without header
  360. COPY_O file1$,file2$
  361.         *1    copy overwrite
  362. COS(F)        returns cosine
  363. COT(F)        returns cotangent
  364. CSIZE [#n,]x,y    set characcter size. x=0,1,2,3 ; y=0,1
  365. CURDIS [#n] *1    suppress cursor
  366. CURSEN [#n] *1    enable cursor
  367. CURSOR [#n],x,y set cursor position using PIXEL coordinates
  368.         (relative to window origin)
  369. CURSOR_OFF [#n]
  370.         *2    use CURDIS, it is shorter and more reliable
  371. CURSOR_ON  [#n]
  372.         *2    use CURSEN, shorter and more reliable
  373. DATAD$        *1    returns default data device
  374. DATASPACE   *2
  375. DATA_AREA   *2
  376. DATA_USE drv$
  377.         *1    set default data device
  378. DATE        returns seconds since anno tobac
  379. DATE$        returns a string containing actual time
  380. DAY$        returns a string with actual day
  381. DDOWN name$
  382.         *1    kind  of subdirectory handling using default data device
  383.         and the default program device in a rather obscure manner.
  384. DEALLOCATE  *2
  385. DEFAULT_DEVICE *2
  386. DEF_INTEGER *2
  387. DEG(F)        convert angle from radian to degree
  388. DELETE file$
  389.        [*1] delete a file
  390. DEL_DEFB    *1    cure to large scale heap fragmentation,  deletes
  391.         file definition blocks. Dangerous !
  392. DESTD$        *1    returns default destination for SPL
  393. DEST_USE name$
  394.         *1    set default destination for SPL
  395. DEVICE_SPACE *2
  396. DEVICE_STATUS *2
  397. DIMN(array(...))
  398.         returns the dimension of an array, or vector in an array
  399. DIR dev$   [*1] shows directory of device. With TK2 it uses defaults
  400. DISK_ED     *4    nice Tool to edit single sectors on a floppy disk.
  401. DLINE n1 [TO n2] old fashioned BASIC editor primitive
  402. DLIST        *1    lists default devices
  403. DNEXT name$
  404.         *1    kind  of subdirectory handling using default data device
  405.         and the default program device in a rather obscure manner.
  406. DO file$    *1    executes a BASIC batch file, which must not contain
  407.         line numbers !
  408. DOTLIN per1,per2,per3,c,x1,y1,x2,y2
  409.         *my own toolkit, draws a dotted line using pixel coordinates
  410. DUP        *1    kind  of subdirectory handling using default data device
  411.         and the default program device in a rather obscure manner.
  412. ED [#n,][l] *1    full screen BASIC editor.
  413.         Only works WITHOUT TAS instructions !
  414.         <ESC> undo line or leave  editor
  415.         <Shift> Up and down: page
  416.         <F4> toggle insert/overwrite
  417.         <Alt><Ctrl> left: delete line
  418. EDIT n%     old  fashioned BASIC editor primitive
  419. EDITF([#n,]F)
  420.         *2    edits and returns a Floatingpoint number
  421. EDITOR file$
  422.         *4    Starts a new file editor session (Assembler Workbench)
  423. EDIT$(str$) *2    edits and returns a string
  424. EDIT%(n%)   *2    edits and returns an integer
  425. ELLIPSE [#n,]x,y,r,e
  426.         draw an ellipse using graphic coordinates
  427. ELLIPSE_R [#n,]x,y,r,e
  428.         draw an ellipse using relative origin
  429. END_CMD     *2    when using MERGE instead of DO, last command in batchfile
  430. END_WHEN ?????
  431. EOF[(#n)]    boolean function EndOfFile
  432.         (without channel refers to DATA in program)
  433. ERLIN        returns line which produced the last error
  434. ERLIN%
  435. ERNUM        returns QDOS  number of last  error
  436. ERNUM%
  437. ERR_BL        returning corresponding QDOS error number
  438. ERR_BN
  439. ERR_BO
  440. ERR_BP
  441. ERR_DF
  442. ERR_EF
  443. ERR_EX
  444. ERR_FE
  445. ERR_FF
  446. ERR_IU
  447. ERR_NC
  448. ERR_NF
  449. ERR_NI
  450. ERR_NJ
  451. ERR_NO
  452. ERR_OM
  453. ERR_OR
  454. ERR_OV
  455. ERR_RO
  456. ERR_TE
  457. ERR_XP
  458. ET file$    *1    execute for trace
  459. EW [#n TO] prog_file$ [TO file2$] [TO #m] [; parameter$]
  460.         *1    execute and wait
  461.         set up pipes and pass parameters
  462. EX [#n TO] prog_file$ [TO file2$] [TO #m] [; parameter$]
  463.         *1    execute and ccontinue
  464.         set up pipes and pass parameters
  465. EXEC file$ [*1] execute and continue. With TK2 same as EX
  466. EXECUTE     *2
  467. EXECUTE_A   *2
  468. EXECUTE_W   *2
  469. EXEC_W file$
  470.        [*1] execute and wait. With TK2 same as EW
  471. EXP(F)        returns e^F
  472. EXTERNAL    *2
  473. EXTRAS [#n].*1. shows any non standard procedures
  474. EXT_FN
  475. EXT_PROC
  476. FCO        *my own toolkit, Fast hardcopy
  477. FDAT(#n)    *1    return dataspace of file
  478. FDEC$(value,field,ndp)
  479.         *1    fixed format decimal
  480. FEXP$(value,field,ndp)
  481.         *1    fixed exponent format
  482. FILE_ED     *?? nice tool
  483. FILL [#n,]b    enables (b=1) or disables (B=0) fill mode in this window
  484. FILL$(c$,n)    returns c$ n times
  485. FLASH [#n,]b    does not work on the Amiga, flashing not implemented
  486. FLEN(#n)    *1    returns length of file
  487. FLOAT$(F)   *2    returns a 6 byte internal representation of a FP number
  488. FLP_OPT     *floppy controller, will not work on the Amiga yet.
  489. FLP_USE str$
  490.         *flp device redefinition (for example FLP_USE 'MDV' will
  491.         emulate a microdrive on the floppy)
  492. FLUSH [#n]  *1    flush file buffers
  493. FNAME$(#n)  *1    returns the filename for this channel
  494. FOPEN(#n,file$)
  495.         *1    open file for read/write and return error status
  496. FOP_DIR(#n,file$)
  497.         *1    open directory and return error status (may be read only)
  498. FOP_IN(#n,file$)
  499.         *1    open file for input and return error status
  500. FOP_NEW(#n,file$)
  501.         *1    create and open new file for output, return error status
  502. FOP_OVER(#n,file$)
  503.         *1    open old file for overwrite, return error status
  504. FORMAT name$    format a device (implemented only for FLP)
  505. FPOS(#n)    *1    return actual file pointer
  506. FREE_MEM    *1    a measure for the amount of available memory in bytes
  507. FREE_MEMORY *2    long form, may differ in a few bytes
  508. FSERVE        *1    Network server task, not implemented on the Amiga yet
  509. FTEST(#n)   *1    check if file exists
  510. FTYP(#n)    *1    returns file type: 0=text , 1=executable , 2=relocatable
  511. FUNCTION    *2
  512. FUPDT(#n)   *1    returns file update date
  513. FXTRA(#n)   *1    returns file extra information
  514. GET #n [\ptr,]var_list
  515.         *1    unformatted input of variables. The type of the variables
  516.         should agree with the corresponding items to read.
  517. GETF(#n)    *2    unformatted input of floatingpoint variables
  518. GETXY x%,y% *my own toolkit, starts a crosshair cursor and returns
  519.         the PIXEL coordinates
  520. GET$(#n)    *2    unformatted input of strings
  521. GET%(#n)    *2    unformatted input of integer
  522. GLOBAL        *2     ???
  523. HCO        *my own toolkit, makes a hardcopy with grey steps
  524. HEX(string$)
  525.         *1    hexadecimal conversion
  526. HEX$(n,bits)
  527.         *1    returns hex representation
  528. IDEC$(value,field,ndp)
  529.         *1    number format conversion
  530. IMPLICIT$   *2
  531. IMPLICIT%   *2
  532. INK [#n,] c    set colour [0..255 including stipples] for PRINT, LINE ...
  533. INKEY$[#n,][time]
  534.         input one character from channel, timeout in 1/50 sec
  535.         Warnig ! the cursor must be enabled !
  536. INPUT ("Last guess " & guess & "New guess?") ! guess
  537. INPUT "Nice day,";isnt_it
  538.         and advanced version of the goodigood INPUT
  539. INPUT$        *2
  540. INT(F)        returns the next bigger integer to F (32 bit signed)
  541. INTEGER$    *2
  542. INVXY x%,y% *my own toolkit, xors a cross at x%,y% using PIXEL coorrdinates
  543. JOBS [#n]   *1    lists active jobs
  544. JOB$(ID)    *1    return name of Job with ID
  545. KEYROW(row)    returns a raw key matrix pattern in QL like  form:
  546.  
  547.          1    2    4    8   16     32   64  128
  548.             ctrl
  549.           7 shift      Alt    X   V     /    N    ,
  550.  
  551.           6  8    2    6    Q   E     O    T    U
  552.  
  553.           5  9    W    I   TAB  R     -    Y
  554.  
  555.           4  L    3    H    1   A     P    D    J
  556.              caps
  557.           3  |   Lock  K    S   F     =    G    ;
  558.  
  559.           2  |    Z     C   B     `    M    ~
  560.         enter                 down
  561.           1      <-    up  ESC  ->     \  space
  562.  
  563.           0 F4   F1    5   F2   F3     F5   4    7
  564.  
  565. LBYTES file$,adr
  566.         load a contents of a file to specified address
  567. LDRAW x,y,x1,y1,c
  568.         *my own toolkit, draw line using PIXEL coordinates
  569. LEN(str$)    returns length of a string
  570. LIBERATE filename$[;]
  571.         *3    loads the QLIBerator BASIC compiler
  572. LINE [#n,] [x,y] TO x1,y1 [TO...]
  573.         draw line using graphic coordinates
  574. LINE_R        same for relative origin
  575. LINK_LOAD   *2
  576. LINK_LOAD_A *2
  577. LINK_LOAD_W *2
  578. LIST [n] [TO m]
  579.         old fashioned Basic editor primitive
  580. LIST_TASKS  *2    If you like to type long stories...
  581. LN(F)        natural logarithm
  582. LOAD file$    loads a BASIC program
  583. LOG10(F)    decadic logarithm
  584. LRESPR file$
  585.         *1    loads a RAM toolkit into the resident procedure area
  586. LRUN file$    load and run a basic program
  587. MERGE file$    merges a BASIC program to the current one
  588. MODE n        8 selects low resolution (8 colour) mode,
  589.         4 selects high resolution (4 colour) mode.
  590.         The 8 colour mode is not emulated.  Future
  591.         expansion to 640 x 512 is intended.
  592. MOVE [#n,] distance
  593.         Move turtle of turtle graphics
  594. MOVE_MEMORY *2
  595. MRUN file$    Merging can be programmed this way
  596. NET n        set network station number. Not implemented on the
  597.         Amiga yet. You are welcome to help us !
  598. NEW        try it after you have written 3 hours on a BASIC program
  599. NFS_USE str$
  600.         *1    Network devicename redefinition, sorry, don't do anything.
  601. NXJOB(ID,Top_job_id)
  602.         *1    returns ID of next job in tree
  603. OJOB(ID [or name])
  604.         *1    find owner of Job
  605. OPEN #n,file$
  606.        [*1] opens a  file for read/write. With TK2 uses defaults
  607. OPEN_DIR #n,dev$
  608.         opens directory of given device (may be read only)
  609. OPEN_IN #n,file$
  610.        [*1] open file for read only
  611. OPEN_NEW #n,file$
  612.        [*1] create and open file
  613. OPEN_OVER #n,file$
  614.         *1    open file for output and rewrite
  615. OPTION_CMD$ *2
  616. OVER [#n,]switch
  617.         0 : print ink on strip
  618.         1 : print ink on transparent strip
  619.            -1 : XOR data on screen
  620. OV_OFF        *new ! disable overflow error. Be carefull !
  621. OV_ON        *new ! enable overflow error
  622. PAINT x,y,c
  623.         *my own toolkit, fills a closed  figure on the screen
  624.         at x,y in PIXEL coordinates with colour c
  625. PAN [#n,]distance[,part]
  626.         pan window #n distance pixel to the left (positive number)
  627.         part = 0 : whole screen (default)
  628.              = 3 : whole cursor line
  629.              = 4 : right hand end of cursor line
  630. PAPER [#n,]colour[,contrast,stipple]
  631.         set background colour
  632. PARNAM$(n)  *1    returns the name of the n'th formal parameter of a
  633.         function (may not  work)
  634. PARSTR$(parameter,n)
  635.         *1    returns the name or the string if it is a string expr.
  636. PARTYP(n)   *1    0 : null  , 1 : string     , 2 : floating , 3 : integer
  637. PARUSE(n)   *1    0 : unset , 1 : variable , 2 : array
  638. PAUSE n     suspend actual task (BASIC) for n/50 seconds
  639. PEEK(adr)    1 byte peek
  640. PEEK_F(adr) *2    6 byte peek
  641. PEEK_L(adr)    4 byte peek
  642. PEEK_W(adr)    2 byte peek
  643. PEEK$(adr,n)
  644.         *2    n byte peek
  645. PENDOWN [#n]    draw turtle moves
  646. PENUP [#n]    hide turtle moves
  647. PI        =3.1415927
  648. PJOB(id || name)
  649.         *1    return priority of job
  650. POINT [#n,]x,y[,x,y...]
  651.         set a point in INK using graphic coordinates
  652. POINT_R [#n,]x,y[,x,y...]
  653.         set a point in INK relative to last position
  654. POKE adr,n    1 byte poke
  655. POKE_L adr,n    4 byte poke
  656. POKE_W adr,n    2 byte poke
  657. POKE$ adr,a$
  658.         *2    n byte poke
  659. POSITION(#n)
  660.         *2    return file position
  661. PRINT [#n,]item[s]
  662.         print variables formatted. separators:
  663.         !  intelligent space
  664.         ,  8 columns tab
  665.         ;  just separate. At the end prevents new line
  666.         \  force new line
  667.         TO n tabulate to column n
  668. PRINT_USING [#n,]format$,item[s]
  669.         *1    the formatting string can contain the following symbols:
  670.         ####.##       fixed point decimal
  671.         ##,###.##     separate thousands with commas
  672.         -#.###!!!!    exponential form, optional sign
  673.         +#.###!!!!    exponential form, including sign
  674. PROCEDURE   *2
  675. PROGD$        *1    return default program    device
  676. PROG_USE dev$
  677.         *1    set default program device
  678. PUT [#n,]position,item[s]
  679.         *1    unformatted output using filepointer.
  680.         The pointer will be updated
  681. QLOAD        *3    Fast load !!!!    does not work on RK00 !!!!
  682. QLRUN        *3    Fast load and run !!!! does not work on RK00 !!!!
  683. QREF name   *3    gives information about BASIC tokens
  684. QREF_A name *3    token information , sort of wildcard
  685. QREF_M        *3
  686. QREF_P        *3
  687. QREF_V        *3
  688. QSAVE        *3    fas save (loading does not work anyway)
  689. QW file;"str" any number of parameters
  690.         *3    like EW (see there) but using _OBJ extension
  691. QX file;"str" any number of parameters
  692.         *3    like EX (see there) but using _OBJ extension
  693. QX_JOB0 ... *3    execute job with owner BASIC
  694. Q_CURSOFF [#n]
  695.         *3    another cursor off utility
  696. Q_CURSON [#n]
  697.         *3    another cursor on utility
  698. Q_ERR        *3    returns the last error number
  699. Q_ERR_LIST  *3    list function and procedures with disabled error handling
  700. Q_ERR_OFF name
  701.         *3    switch off error handling for a procedure or function
  702. Q_ERR_ON name
  703.         *3    enable error handling for a procedure or fuunction
  704. Q_L        *3
  705. Q_MYJOB     *3    returns actual job id
  706. Q_PIPE        *3
  707. RAD(n)        convert degree to radian
  708. RAM_USE dev$
  709.         *4    mdv emulation for Ram disk
  710. RANDOMISE [n]    reset random number generator
  711. READ item[,item...]
  712.         read data from program file
  713. RECHP adr   *1    deallocate common heap (counterpart to ALCHPP)
  714. RECOL [#n,]c0,c1,c2,c3,c4,c5,c6,c7
  715.         recolour a window
  716. REFERENCE   *2    forget it
  717. RELEASE_TASK *2
  718. REMOVE_TASK *2
  719. RENAME file TO newname
  720.        [*1] rename files. with TK2 you may use commas to separate
  721. RENUM [start [TO end;] new][,step]
  722.         renumber a basic program
  723. REPORT
  724. RESPR(n)    reserve n bytes in resident procedure area, return adress
  725. RETRY        retry after error (repeat instruction)
  726. RETRY_HERE
  727. RJOB id or name
  728.         *1    force remove job
  729. RND[(n [TO n2]) return random number between 0 and 1 or n1 and n2
  730. RUN [n]     start execution of BASIC program
  731. SAVE file[,n1 TO n2]
  732.        [*1] save BASIC program (as ASCII)
  733. SAVE_O        *1    save overwrite
  734. SBYTES file,adr,n
  735.        [*1] save n bytes memory starting with adr as file
  736. SBYTES_O file,adr,n
  737.         *1    save memory overwrite
  738. SCALE [#n,]scale,origin
  739.         set width and origin for grafic coordinates
  740.         default is 100 at 0,0 (Monitor X/Y is included !)
  741. SCROLL [#n,]distance,part
  742.         scroll window distance pixel
  743.         part = 0  whole screen
  744.         part = 1  top excluding cursor line
  745.         part = 2  bottom excluding cursor line
  746. SDATE year,month,day,hours,minutes,seconds
  747.         set clock (does not affect battery buffered realtime clock)
  748. SEARCH_MEMORY
  749. SET x%,y%,c%
  750.         *my own toolkit: set pixel using pixel ccoordinates
  751. SET_CHANNEL
  752. SET_FONT
  753. SET_POSITION #n,p
  754.         *2    set file pointer
  755. SET_PRIORITY
  756. SEXEC file,adr,size,dataspace
  757.        [*1] save memory block as executable task
  758. SEXEC_O file,adr,size,dataspace
  759.         *1    save memory block as task, overwrite
  760. SIN(x)        return sine
  761. SNOOZE        *2
  762. SPJOB id,priority
  763.         *1    set new priority for job
  764. SPL file    *1    file spooler (Background printing)
  765. SPLF
  766. SPL_USE dev$
  767.         *1    set default spool device
  768. SQRT(x)     return the square root of x
  769. STAT [#n,]dev$    returns device statistics
  770. STOP        stop basic program (continue with CONTINUE)
  771. STRING$
  772. STRIP [#n],c    set strip colour
  773. SUSPEND_TASK *2
  774. SYS_RESET   *new does not work on Amiga (CRASH !!!)
  775. S_GPOS #n   *4    position of filepointer for screens
  776. S_LOAD #n   *4    load compressed picture from file
  777. S_SAVE #n[,size]
  778.         *4    compress and save picure
  779. S_SPOS        *4
  780. TAN(x)        return tangent of x
  781. THROW_AWAY  *2    do it
  782. TK2_EXT     *1    force Toolkit 2 extensions
  783. TK_VER$     *2
  784. TRA adr     set translate table for output (to printer)
  785. TRUNCATE #n *1    truncate overwrite file
  786. TURN [#n],angle
  787.         turn turtle specified angle
  788. TURNTO [#n],angle
  789.         turn turtle specified angle absolute
  790. TYPE_IN #n,str$
  791.         *2    writes string to a channel (a bit tricky, but usefull)
  792. UNDER [#n,] 0 or 1
  793.         turns underlining on (1) or off (0)
  794. VER$        returns a string with the QDOS version
  795. VIEW [#n,]file
  796.         *1    a little bit like the usual TYPE
  797. WCOPY file1,file2
  798.         *1    wildcard copy. The Wildcard is the Underliner '_' !
  799. WDEL file   *1    wildcard delete ( Wildcard='_' Underliner ! )
  800. WDEL_F        *1    !!!! Danger !!!!
  801. WDIR        *1    wildcard directory (Wildcard='_' Underliner !)
  802. WHEN_ERROR  *2
  803. WIDTH [#n,]line_width
  804.         set default width of devices (AUTOMATIC LF !)
  805. WINDOW [#n,]sx,sy,x,y
  806.         specify window size (sx,sy) and origin (x,y) in pixel
  807. WMON        *1    default monitor screen
  808. WREN name1,name2
  809.         *1    wildcard rename (Wildcard='_' Underliner !)
  810. WSTAT files *1    wildcard file statistics
  811. WTV        *1    default TV screen
  812.  
  813. 4) Introduction to DOS-calls
  814.  
  815.   a) Supervisor TRAP (#0)
  816.      Enter Supervisormode with TRAP #0
  817.  
  818.   b) Manager TRAPs  (#1)
  819.      system calls [ MOVEQ #??,D0 .... TRAP #1]
  820.      D0=$00 MT.INF     provide current job and system information
  821.     Call parameters        Return parameters
  822.     D1               D1.L current Job ID
  823.     D2               D2.L ASCII version
  824.     D3               D3    preserved
  825.     A0               A0    pointer to system variables
  826.     A1               A1    preserved
  827.     A2               A2    preserved
  828.     A3               A3    preserved
  829.  
  830.      D0=$01 MT.CJOB    create a job in transient prog. area
  831.     Call parameters        Return parameters
  832.     D1.L owner JOB ID       D1.L Job ID
  833.     D2.L length of code(bytes) D2    preserved
  834.     D3.L length of data space  D3    preserved
  835.     A0               A0    base of area allocated
  836.     A1   start address or 0    A1    preserved
  837.     A2               A2    preserved
  838.     A3               A3    preserved
  839.     Errors : OM,NJ
  840.  
  841.      D0=$02 MT.JINF    Provide information on a job
  842.     Call parameters        Return parameters
  843.     D1.L JOB ID           D1.L next Job in tree
  844.     D2.L Job at top of tree    D2.L owner of Job
  845.     D3               D3    MSB<0 if suspended, LSB=priority
  846.     A0               A0    base address of job
  847.     A1               A1    ?
  848.     A2               A2    preserved
  849.     A3               A3    preserved
  850.     Errors : NJ
  851.  
  852.      D0=$03 illegal system trap
  853.  
  854.      D0=$04 MT.RJOB    Remove job from transient prog. area
  855.     Call parameters        Return parameters
  856.     D1.L JOB ID           D1    ?
  857.     D2               D2    ?
  858.     D3.L Error code        D3    ?
  859.     A0               A0    ?
  860.     A1               A1    ?
  861.     A2               A2    ?
  862.     A3               A3    ?
  863.     Errors : NJ,NC
  864.  
  865.      D0=$05 MT.FRJOB   force remove job from transient prog. area
  866.     Call parameters        Return parameters
  867.     D1.L JOB ID           D1    ?
  868.     D2               D2    ?
  869.     D3.L Error code        D3    ?
  870.     A0               A0    ?
  871.     A1               A1    ?
  872.     A2               A2    ?
  873.     A3               A3    ?
  874.     Errors : NJ
  875.  
  876.      D0=$06 MT.FREE    finds largest contiguous free trans. prog. space
  877.     Call parameters        Return parameters
  878.     D1               D1.L length of space
  879.     D2               D2    ?
  880.     D3               D3    ?
  881.     A0               A0    ?
  882.     A1               A1    ?
  883.     A2               A2    ?
  884.     A3               A3    ?
  885.  
  886.      D0=$07 MT.TRAPV   sets per job pointer to trap vectors
  887.     Call parameters        Return parameters
  888.     D1.L JOB ID           D1.L Job ID
  889.     D2               D2    preserved
  890.     D3               D3    preserved
  891.     A0               A0    base of job
  892.     A1   pointer to table       A1    ?
  893.     A2               A2    preserved
  894.     A3               A3    preserved
  895.  
  896.      D0=$08 MT.SUSJB   suspend job
  897.     Call parameters        Return parameters
  898.     D1.L JOB ID           D1.L Job ID
  899.     D2               D2    preserved
  900.     D3.W timeout           D3    preserved
  901.     A0               A0    base of job control area
  902.     A1   address of flag byte  A1    preserved
  903.     A2               A2    preserved
  904.     A3               A3    preserved
  905.     Errors : NJ
  906.  
  907.      D0=$09 MT.RELJB   Release job
  908.     Call parameters        Return parameters
  909.     D1.L JOB ID           D1.L Job ID
  910.     D2               D2    preserved
  911.     D3               D3    preserved
  912.     A0               A0    base of job control area
  913.     A1               A1    preserved
  914.     A2               A2    preserved
  915.     A3               A3    preserved
  916.     Errors : NJ
  917.  
  918.      D0=$0A MT.ACTIV   activate job
  919.     Call parameters        Return parameters
  920.     D1.L JOB ID           D1.L Job ID
  921.     D2.B priority (0-127)       D2    preserved
  922.     D3.W timeout (-1,0)       D3    preserved
  923.     A0               A0    base of job control area
  924.     A1               A1    preserved
  925.     A2               A2    preserved
  926.     A3               A3    preserved
  927.     Errors : NJ,NC
  928.  
  929.      D0=$0B MT.PRIOR   change a job's priority
  930.     Call parameters        Return parameters
  931.     D1.L JOB ID           D1.L Job ID
  932.     D2.B priority (0-127)       D2    preserved
  933.     D3               D3    preserved
  934.     A0               A0    base of job control area
  935.     A1               A1    preserved
  936.     A2               A2    preserved
  937.     A3               A3    preserved
  938.     Errors : NJ
  939.  
  940.      D0=$0C MT.ALLOC   allocate an area in a heap
  941.     Call parameters        Return parameters
  942.     D1.L required length       D1.L allocated length
  943.     D2               D2    ?
  944.     D3               D3    ?
  945.     A0   pointer to pointer    A0    base of area allocated
  946.          to free space
  947.     A1               A1    ?
  948.     A2               A2    ?
  949.     A3               A3    ?
  950.     A6   base address       A6    preserved
  951.     Errors : OM
  952.  
  953.      D0=$0D MT.LNKFR   link free space back into heap
  954.     Call parameters        Return parameters
  955.     D1.L length to link in       D1    ?
  956.     D2               D2    ?
  957.     D3               D3    ?
  958.     A0   base of new space       A0    ?
  959.     A1   pointer to pointer    A1    ?
  960.          to free space
  961.     A2               A2    ?
  962.     A3               A3    ?
  963.     A6   base address       A6    preserved
  964.  
  965.      D0=$0E MT.ALRES   allocate resident procedure area
  966.     Call parameters        Return parameters
  967.     D1.L no. of bytes required D1    ?
  968.     D2               D2    ?
  969.     D3               D3    ?
  970.     A0               A0    base address of area
  971.     A1               A1    ?
  972.     A2               A2    ?
  973.     A3               A3    ?
  974.     Errors : OM,NC
  975.  
  976.      D0=$0F MT.RERES   release resident procedure area
  977.     Call parameters        Return parameters
  978.     D1               D1    ?
  979.     D2               D2    ?
  980.     D3               D3    ?
  981.     A0               A0    ?
  982.     A1               A1    ?
  983.     A2               A2    ?
  984.     A3               A3    ?
  985.     Errors : NC
  986.  
  987.      D0=$10 MT.DMODE   Sets or reads the display mode
  988.     Call parameters        Return parameters
  989.     D1.B -1 read mode       D1.B display mode
  990.          0 : 512*256
  991.          8 : 256*256
  992.     D2.B -1 read display       D2.B display type
  993.          0 : monitor
  994.          1 : TV
  995.     D3               D3    preserved
  996.     A0               A0    preserved
  997.     A1               A1    preserved
  998.     A2               A2    preserved
  999.     A3               A3    ?
  1000.  
  1001.      D0=$11 MT.IPCOM   Sends a command to the IPC
  1002.     Call parameters        Return parameters
  1003.     D1               D1.B IPC return parameter
  1004.     D2               D2    preserved
  1005.     D3               D3    preserved
  1006.     D5               D5    ?
  1007.     D7               D7    ?
  1008.     A0               A0    preserved
  1009.     A1               A1    preserved
  1010.     A2               A2    preserved
  1011.     A3.L pointer to command    A3    preserved
  1012.  
  1013.      D0=$12 MT.BAUD    sets the baud rate
  1014.     Call parameters        Return parameters
  1015.     D1.W baud rate           D1    ?
  1016.     D2               D2    preserved
  1017.     D3               D3    preserved
  1018.     A0               A0    preserved
  1019.     A1               A1    preserved
  1020.     A2               A2    preserved
  1021.     A3               A3    preserved
  1022.  
  1023.      D0=$13 MT.RCLCK   reads the clock
  1024.     Call parameters        Return parameters
  1025.     D1               D1.L time in seconds
  1026.     D2               D2    ?
  1027.     D3               D3    preserved
  1028.     A0               A0    ?
  1029.     A1               A1    preserved
  1030.     A2               A2    preserved
  1031.     A3               A3    preserved
  1032.  
  1033.      D0=$14 MT.SCLCK   sets the clock
  1034.     Call parameters        Return parameters
  1035.     D1.L time in seconds       D1.L time in seconds
  1036.     D2               D2    ?
  1037.     D3               D3    ?
  1038.     A0               A0    ?
  1039.     A1               A1    preserved
  1040.     A2               A2    preserved
  1041.     A3               A3    preserved
  1042.  
  1043.      D0=$15 MT.ACLCK   adjust the clock
  1044.     Call parameters        Return parameters
  1045.     D1.L adjustment in seconds D1.L time in seconds
  1046.     D2               D2    ?
  1047.     D3               D3    ?
  1048.     A0               A0    ?
  1049.     A1               A1    preserved
  1050.     A2               A2    preserved
  1051.     A3               A3    preserved
  1052.  
  1053.      D0=$16 MT.ALBAS   allocate Basic programm area
  1054.     Call parameters        Return parameters
  1055.     D1.L no. of bytes required D1.L number of bytes allocated
  1056.     D2               D2    ?
  1057.     D3               D3    ?
  1058.     A0               A0    ?
  1059.     A1               A1    ?
  1060.     A2               A2    ?
  1061.     A3               A3    ?
  1062.     A6   base address       A6    new base address
  1063.     A7   USP           A7    new USP
  1064.     Errors : OM
  1065.  
  1066.      D0=$17 MT.REBAS   release Basic programm area
  1067.     Call parameters        Return parameters
  1068.     D1.L no. of bytes       D1.L number of bytes released
  1069.     D2               D2    ?
  1070.     D3               D3    ?
  1071.     A0               A0    ?
  1072.     A1               A1    ?
  1073.     A2               A2    ?
  1074.     A3               A3    ?
  1075.     A6   base address       A6    new base address
  1076.     A7   USP           A7    new USP
  1077.  
  1078.      D0=$18 MT.ALCHP   allocate common heap area
  1079.     Call parameters        Return parameters
  1080.     D1.L no. of bytes required D1.L number of bytes allocated
  1081.     D2.L owner job ID       D2    ?
  1082.     D3               D3    ?
  1083.     A0               A0    base address of area
  1084.     A1               A1    ?
  1085.     A2               A2    ?
  1086.     A3               A3    ?
  1087.     Errors : OM,NJ
  1088.  
  1089.      D0=$19 MT.RECHP   release common heap area
  1090.     Call parameters        Return parameters
  1091.     D1               D1    ?
  1092.     D2               D2    ?
  1093.     D3               D3    ?
  1094.     A0.L base of area to free  A0    ?
  1095.     A1               A1    ?
  1096.     A2               A2    ?
  1097.     A3               A3    ?
  1098.  
  1099.      D0=$1A MT.LXINT   links in an external interrupt service routine
  1100.     Call parameters        Return parameters
  1101.     D1               D1    preserved
  1102.     D2               D2    preserved
  1103.     D3               D3    preserved
  1104.     A0.L address of link       A0    preserved
  1105.     A1.L entry address       A1    ?
  1106.          A1 -> 4(A0) !
  1107.     A2               A2    preserved
  1108.     A3               A3    preserved
  1109.  
  1110.      D0=$1B MT.RXINT   remove external interrupt routine from list
  1111.     Call parameters        Return parameters
  1112.     D1               D1    preserved
  1113.     D2               D2    preserved
  1114.     D3               D3    preserved
  1115.     A0.L address of link       A0    preserved
  1116.     A1               A1    ?
  1117.     A2               A2    preserved
  1118.     A3               A3    preserved
  1119.  
  1120.      D0=$1C MT.LPOLL   link in 50/60 Hz poll routine
  1121.     Call parameters        Return parameters
  1122.     D1               D1    preserved
  1123.     D2               D2    preserved
  1124.     D3               D3    preserved
  1125.     A0.L address of link       A0    preserved
  1126.     A1.L entry address       A1    ?
  1127.          A1 -> 4(A0) !
  1128.     A2               A2    preserved
  1129.     A3               A3    preserved
  1130.  
  1131.      D0=$1D MT.RPOLL   remove 50/60 Hz routine from list
  1132.     Call parameters        Return parameters
  1133.     D1               D1    preserved
  1134.     D2               D2    preserved
  1135.     D3               D3    preserved
  1136.     A0.L address of link       A0    preserved
  1137.     A1               A1    ?
  1138.     A2               A2    preserved
  1139.     A3               A3    preserved
  1140.  
  1141.      D0=$1E MT.LSCHD   links in a scheduler loop task
  1142.     Call parameters        Return parameters
  1143.     D1               D1    preserved
  1144.     D2               D2    preserved
  1145.     D3               D3    preserved
  1146.     A0.L address of link       A0    preserved
  1147.     A1.L entry address       A1    ?
  1148.          A1 -> 4(A0) !
  1149.     A2               A2    preserved
  1150.     A3               A3    preserved
  1151.  
  1152.      D0=$1F MT.RSCHD   remove scheduler loop task from list
  1153.     Call parameters        Return parameters
  1154.     D1               D1    preserved
  1155.     D2               D2    preserved
  1156.     D3               D3    preserved
  1157.     A0.L address of link       A0    preserved
  1158.     A1               A1    ?
  1159.     A2               A2    preserved
  1160.     A3               A3    preserved
  1161.  
  1162.      D0=$20 MT.LIOD    links in I/O device driver
  1163.     Call parameters        Return parameters
  1164.     D1               D1    preserved
  1165.     D2               D2    preserved
  1166.     D3               D3    preserved
  1167.     A0.L address of link       A0    preserved
  1168.     A1.L entry address       A1    ?
  1169.          A1 -> 4(A0) !
  1170.     A2               A2    preserved
  1171.     A3               A3    preserved
  1172.  
  1173.      D0=$21 MT.RIOD    remove I/O device driver from list
  1174.     Call parameters        Return parameters
  1175.     D1               D1    preserved
  1176.     D2               D2    preserved
  1177.     D3               D3    preserved
  1178.     A0.L address of link       A0    preserved
  1179.     A1               A1    ?
  1180.     A2               A2    preserved
  1181.     A3               A3    preserved
  1182.  
  1183.      D0=$22 MT.LDD     links in directory device driver
  1184.     Call parameters        Return parameters
  1185.     D1               D1    preserved
  1186.     D2               D2    preserved
  1187.     D3               D3    preserved
  1188.     A0.L address of link       A0    preserved
  1189.     A1.L entry address       A1    ?
  1190.          A1 -> 4(A0) !
  1191.     A2               A2    preserved
  1192.     A3               A3    preserved
  1193.  
  1194.      D0=$23 MT.RDD     remove directory device driver from list
  1195.     Call parameters        Return parameters
  1196.     D1               D1    preserved
  1197.     D2               D2    preserved
  1198.     D3               D3    preserved
  1199.     A0.L address of link       A0    preserved
  1200.     A1               A1    ?
  1201.     A2               A2    preserved
  1202.     A3               A3    preserved
  1203.  
  1204.  
  1205.   c) IO allocation  TRAPs (#2)
  1206.      D0=$01 IO.OPEN    opens a channel for I/O
  1207.     Call parameters        Return parameters
  1208.     D1.L job ID           D1    job ID
  1209.     D2               D2    preserved
  1210.     D3.L code where bit:       D3    preserved
  1211.          0 = old exclusive
  1212.          1 = old shared
  1213.          2 = new exclusive
  1214.          3 = new overwrite
  1215.          4 = open Directory
  1216.     A0.L addresss of name       A0.L channel ID
  1217.     A1               A1    preserved
  1218.     A2               A2    preserved
  1219.     A3               A3    preserved
  1220.     Errors : NO,NJ,OM,NF,EX,IU,BN
  1221.  
  1222.      D0=$02 IO.CLOSE   closes a channel
  1223.     Call parameters        Return parameters
  1224.     D1               D1    preserved
  1225.     D2               D2    preserved
  1226.     D3               D3    preserved
  1227.     A0.L channel ID        A0    ?
  1228.     A1               A1    preserved
  1229.     A2               A2    preserved
  1230.     A3               A3    preserved
  1231.     Errors : NO
  1232.  
  1233.      D0=$03 IO.FORMT   Format a sectored medium
  1234.     Call parameters        Return parameters
  1235.     D1               D1.W good sectors
  1236.     D2               D2.W total sectors
  1237.     D3               D3    preserved
  1238.     A0.L pointer to name       A0    ?
  1239.     A1               A1    preserved
  1240.     A2               A2    preserved
  1241.     A3               A3    preserved
  1242.     Errors : OM,FF,NF,IU
  1243.  
  1244.      D0=$02 IO.CLOSE   closes a channel
  1245.     Call parameters        Return parameters
  1246.     D1.L job ID           D1    ?
  1247.     D2               D2    preserved
  1248.     D3               D3    ?
  1249.     A0.L pointer to name       A0    ?
  1250.     A1               A1    ?
  1251.     A2               A2    ?
  1252.     A3               A3    preserved
  1253.     Errors : NO,OM,NF,BN
  1254.  
  1255.   d) IO utilisation TRAPs (#3)
  1256.      TRAP #3  IO calls [ MOVEQ #??,D0 .... TRAP #3 ]
  1257.      D0=$00 IO.PEND    Checks for pending input
  1258.     Call parameters        Return parameters
  1259.     D1               D1    ?
  1260.     D2               D2    preserved
  1261.     D3.W timeout           D3    preserved
  1262.     A0.L channel ID        A0    preserved
  1263.     A1               A1    ?
  1264.     A2               A2    preserved
  1265.     A3               A3    preserved
  1266.     Errors : NC,NO,EF
  1267.  
  1268.      D0=$01 IO.FBYTE    Fetch a byte
  1269.     Call parameters        Return parameters
  1270.     D1               D1.B byte fetched
  1271.     D2               D2    preserved
  1272.     D3.W timeout           D3    preserved
  1273.     A0.L channel ID        A0    preserved
  1274.     A1               A1    ?
  1275.     A2               A2    preserved
  1276.     A3               A3    preserved
  1277.     Errors : NC,NO,EF
  1278.  
  1279.      D0=$02 IO.FLINE    Fetch a line of character terminated by <LF>
  1280.     Call parameters        Return parameters
  1281.     D1               D1.W number of bytes fetched
  1282.     D2.W length of buffer       D2    preserved
  1283.     D3.W timeout           D3    preserved
  1284.     A0.L channel ID        A0    preserved
  1285.     A1.L base of buffer       A1    updated pointer to buffer
  1286.     A2               A2    preserved
  1287.     A3               A3    preserved
  1288.     Errors : NC,NO,EF,BO
  1289.  
  1290.      D0=$03 IO.FSTRG    Fetches a string of bytes
  1291.     Call parameters        Return parameters
  1292.     D1               D1.W number of bytes fetched
  1293.     D2.W length of buffer       D2    preserved
  1294.     D3.W timeout           D3    preserved
  1295.     A0.L channel ID        A0    preserved
  1296.     A1.L base of buffer       A1    updated pointer to buffer
  1297.     A2               A2    preserved
  1298.     A3               A3    preserved
  1299.     Errors : NC,NO,EF
  1300.  
  1301.      D0=$04 IO.EDLIN    edits a line of characters
  1302.     Call parameters        Return parameters
  1303.     D1.L cursor/line length    D1.L cursor/line length
  1304.     D2.W length of buffer       D2    preserved
  1305.     D3.W timeout           D3    preserved
  1306.     A0.L channel ID        A0    preserved
  1307.     A1.L pointer to EOL       A1    pointer to end of line
  1308.     A2               A2    preserved
  1309.     A3               A3    preserved
  1310.     Errors : NC,NO,BO
  1311.  
  1312.      D0=$05 IO.SBYTE    sends a byte
  1313.     Call parameters        Return parameters
  1314.     D1.B byte to be sent       D1    ?
  1315.     D2               D2    preserved
  1316.     D3.W timeout           D3    preserved
  1317.     A0.L channel ID        A0    preserved
  1318.     A1               A1    ?
  1319.     A2               A2    preserved
  1320.     A3               A3    preserved
  1321.     Errors : NC,NO,DF,OR
  1322.  
  1323.      D0=$06 illegal System call
  1324.      D0=$07 IO.SSTRG    sends a string of bytes
  1325.     Call parameters        Return parameters
  1326.     D1               D1.W number of bytes sent
  1327.     D2.W number of bytes       D2    preserved
  1328.     D3.W timeout           D3    preserved
  1329.     A0.L channel ID        A0    preserved
  1330.     A1.L base of buffer       A1    updated pointer to buffer
  1331.     A2               A2    preserved
  1332.     A3               A3    preserved
  1333.     Errors : NC,NO,DF
  1334.  
  1335.      D0=$08 illegal System call
  1336.      D0=$09 IO.EXTOP    invoke additional routines as part of screen driver
  1337.      D0=$0A SD.PXENQ    return window size and cursor position (pixel)
  1338.     Call parameters        Return parameters
  1339.     D1               D1    preserved
  1340.     D2               D2    preserved
  1341.     D3.W timeout           D3    preserved
  1342.     A0.L channel ID        A0    preserved
  1343.     A1.L base of buffer       A1    ?
  1344.     A2               A2    preserved
  1345.     A3               A3    preserved
  1346.     Errors : NC,NO
  1347.     0(A1) = X-dimension of window
  1348.     2(A1) = Y-dimension of window
  1349.     4(A1) = X-position of cursor
  1350.     6(A1) = Y-position of cursor
  1351.  
  1352.      D0=$0B SD.CHENQ    return window size and cursor position (character)
  1353.     Call parameters        Return parameters
  1354.     D1               D1    preserved
  1355.     D2               D2    preserved
  1356.     D3.W timeout           D3    preserved
  1357.     A0.L channel ID        A0    preserved
  1358.     A1.L base of buffer       A1    ?
  1359.     A2               A2    preserved
  1360.     A3               A3    preserved
  1361.     Errors : NC,NO
  1362.     0(A1) = X-dimension of window
  1363.     2(A1) = Y-dimension of window
  1364.     4(A1) = X-position of cursor
  1365.     6(A1) = Y-position of cursor
  1366.  
  1367.      D0=$0C SD.BORDR    sets the border with and colour
  1368.     Call parameters        Return parameters
  1369.     D1.B colour           D1    ?
  1370.     D2.W width           D2    preserved
  1371.     D3.W timeout           D3    preserved
  1372.     A0.L channel ID        A0    preserved
  1373.     A1.L               A1    preserved
  1374.     A2               A2    preserved
  1375.     A3               A3    preserved
  1376.     Errors : NC,NO
  1377.  
  1378.      D0=$0D SD.WDEF    redifines a window
  1379.     Call parameters        Return parameters
  1380.     D1.B border colour       D1    ?
  1381.     D2.W border width       D2    preserved
  1382.     D3.W timeout           D3    preserved
  1383.     A0.L channel ID        A0    preserved
  1384.     A1.L base of buffer       A1    ?
  1385.     A2               A2    preserved
  1386.     A3               A3    preserved
  1387.     Errors : NC,NO,OR
  1388.     0(A1) = X-dimension of window
  1389.     2(A1) = Y-dimension of window
  1390.     4(A1) = X-origin
  1391.     6(A1) = Y-origin
  1392.  
  1393.      D0=$0E SD.CURE    enables the cursor
  1394.     Call parameters        Return parameters
  1395.     D1               D1    ?
  1396.     D2               D2    preserved
  1397.     D3.W timeout           D3    preserved
  1398.     A0.L channel ID        A0    preserved
  1399.     A1               A1    ?
  1400.     A2               A2    preserved
  1401.     A3               A3    preserved
  1402.     Errors : NC,NO
  1403.  
  1404.      D0=$0F SD.CURS    suppress the cursor
  1405.     Call parameters        Return parameters
  1406.     D1               D1    ?
  1407.     D2               D2    preserved
  1408.     D3.W timeout           D3    preserved
  1409.     A0.L channel ID        A0    preserved
  1410.     A1               A1    ?
  1411.     A2               A2    preserved
  1412.     A3               A3    preserved
  1413.     Errors : NC,NO
  1414.  
  1415.      D0=$10 SD.POS    positionm cursor at row, column (character)
  1416.     Call parameters        Return parameters
  1417.     D1.W column number       D1    ?
  1418.     D2.W row number        D2    preserved
  1419.     D3.W timeout           D3    preserved
  1420.     A0.L channel ID        A0    preserved
  1421.     A1               A1    ?
  1422.     A2               A2    preserved
  1423.     A3               A3    preserved
  1424.     Errors : NC,NO,OR
  1425.  
  1426.      D0=$11 SD.TAB    position cursor at column
  1427.     Call parameters        Return parameters
  1428.     D1.W column number       D1    ?
  1429.     D2               D2    preserved
  1430.     D3.W timeout           D3    preserved
  1431.     A0.L channel ID        A0    preserved
  1432.     A1               A1    ?
  1433.     A2               A2    preserved
  1434.     A3               A3    preserved
  1435.     Errors : NC,NO,OR
  1436.  
  1437.      D0=$12 SD.NL    new line
  1438.     Call parameters        Return parameters
  1439.     D1               D1    ?
  1440.     D2               D2    preserved
  1441.     D3.W timeout           D3    preserved
  1442.     A0.L channel ID        A0    preserved
  1443.     A1               A1    ?
  1444.     A2               A2    preserved
  1445.     A3               A3    preserved
  1446.     Errors : NC,NO,OR
  1447.  
  1448.      D0=$13 SD.PCOL    previus column
  1449.     Call parameters        Return parameters
  1450.     D1               D1    ?
  1451.     D2               D2    preserved
  1452.     D3.W timeout           D3    preserved
  1453.     A0.L channel ID        A0    preserved
  1454.     A1               A1    ?
  1455.     A2               A2    preserved
  1456.     A3               A3    preserved
  1457.     Errors : NC,NO,OR
  1458.  
  1459.      D0=$14 SD.NCOL    next column
  1460.     Call parameters        Return parameters
  1461.     D1               D1    ?
  1462.     D2               D2    preserved
  1463.     D3.W timeout           D3    preserved
  1464.     A0.L channel ID        A0    preserved
  1465.     A1               A1    ?
  1466.     A2               A2    preserved
  1467.     A3               A3    preserved
  1468.     Errors : NC,NO,OR
  1469.  
  1470.      D0=$15 SD.PROW    previus row
  1471.     Call parameters        Return parameters
  1472.     D1               D1    ?
  1473.     D2               D2    preserved
  1474.     D3.W timeout           D3    preserved
  1475.     A0.L channel ID        A0    preserved
  1476.     A1               A1    ?
  1477.     A2               A2    preserved
  1478.     A3               A3    preserved
  1479.     Errors : NC,NO,OR
  1480.  
  1481.      D0=$16 SD.NROW    next row
  1482.     Call parameters        Return parameters
  1483.     D1               D1    ?
  1484.     D2               D2    preserved
  1485.     D3.W timeout           D3    preserved
  1486.     A0.L channel ID        A0    preserved
  1487.     A1               A1    ?
  1488.     A2               A2    preserved
  1489.     A3               A3    preserved
  1490.     Errors : NC,NO,OR
  1491.  
  1492.      D0=$17 SD.PIXP    position cursor using pixel coordinates
  1493.     Call parameters        Return parameters
  1494.     D1.W X-coordinate       D1    ?
  1495.     D2.W Y-coordinate       D2    preserved
  1496.     D3.W timeout           D3    preserved
  1497.     A0.L channel ID        A0    preserved
  1498.     A1               A1    ?
  1499.     A2               A2    preserved
  1500.     A3               A3    preserved
  1501.     Errors : NC,NO,OR
  1502.  
  1503.      D0=$18 SD.SCROL    Scroll all of a window
  1504.     Call parameters        Return parameters
  1505.     D1.W distance to scroll    D1    ?
  1506.     D2               D2    preserved
  1507.     D3.W timeout           D3    preserved
  1508.     A0.L channel ID        A0    preserved
  1509.     A1               A1    ?
  1510.     A2               A2    preserved
  1511.     A3               A3    preserved
  1512.     Errors : NC,NO
  1513.  
  1514.      D0=$19 SD.SCRTP    scroll the top of a window
  1515.     Call parameters        Return parameters
  1516.     D1.W distance to scroll    D1    ?
  1517.     D2               D2    preserved
  1518.     D3.W timeout           D3    preserved
  1519.     A0.L channel ID        A0    preserved
  1520.     A1               A1    ?
  1521.     A2               A2    preserved
  1522.     A3               A3    preserved
  1523.     Errors : NC,NO
  1524.  
  1525.      D0=$1A SD.SCRBT    scroll the bottom of a window
  1526.     Call parameters        Return parameters
  1527.     D1.W distance to scroll    D1    ?
  1528.     D2               D2    preserved
  1529.     D3.W timeout           D3    preserved
  1530.     A0.L channel ID        A0    preserved
  1531.     A1               A1    ?
  1532.     A2               A2    preserved
  1533.     A3               A3    preserved
  1534.     Errors : NC,NO
  1535.  
  1536.      D0=$1B SD.PAN    Pans all of a window
  1537.     Call parameters        Return parameters
  1538.     D1.W distance to pan       D1    ?
  1539.     D2               D2    preserved
  1540.     D3.W timeout           D3    preserved
  1541.     A0.L channel ID        A0    preserved
  1542.     A1               A1    ?
  1543.     A2               A2    preserved
  1544.     A3               A3    preserved
  1545.     Errors : NC,NO
  1546.  
  1547.      D0=$1C illegal system call
  1548.      D0=$1D illegal system call
  1549.      D0=$1E SD.PANLN    pans cursor line
  1550.     Call parameters        Return parameters
  1551.     D1.W distance to pan       D1    ?
  1552.     D2               D2    preserved
  1553.     D3.W timeout           D3    preserved
  1554.     A0.L channel ID        A0    preserved
  1555.     A1               A1    ?
  1556.     A2               A2    preserved
  1557.     A3               A3    preserved
  1558.     Errors : NC,NO
  1559.  
  1560.      D0=$1F SD.PANRT    pans right hand end of cursor line
  1561.     Call parameters        Return parameters
  1562.     D1.W distance to pan       D1    ?
  1563.     D2               D2    preserved
  1564.     D3.W timeout           D3    preserved
  1565.     A0.L channel ID        A0    preserved
  1566.     A1               A1    ?
  1567.     A2               A2    preserved
  1568.     A3               A3    preserved
  1569.     Errors : NC,NO
  1570.  
  1571.      D0=$20 SD.CLEAR    clears all of a window
  1572.     Call parameters        Return parameters
  1573.     D1               D1    ?
  1574.     D2               D2    preserved
  1575.     D3.W timeout           D3    preserved
  1576.     A0.L channel ID        A0    preserved
  1577.     A1               A1    ?
  1578.     A2               A2    preserved
  1579.     A3               A3    preserved
  1580.     Errors : NC,NO
  1581.  
  1582.      D0=$21 SD.CLRTP    clears the top of a window
  1583.     Call parameters        Return parameters
  1584.     D1               D1    ?
  1585.     D2               D2    preserved
  1586.     D3.W timeout           D3    preserved
  1587.     A0.L channel ID        A0    preserved
  1588.     A1               A1    ?
  1589.     A2               A2    preserved
  1590.     A3               A3    preserved
  1591.     Errors : NC,NO
  1592.  
  1593.      D0=$22 SD.CLRBT    clears the bottom of a window
  1594.     Call parameters        Return parameters
  1595.     D1               D1    ?
  1596.     D2               D2    preserved
  1597.     D3.W timeout           D3    preserved
  1598.     A0.L channel ID        A0    preserved
  1599.     A1               A1    ?
  1600.     A2               A2    preserved
  1601.     A3               A3    preserved
  1602.     Errors : NC,NO
  1603.  
  1604.      D0=$23 SD.CLRLN    clears the cursor line
  1605.     Call parameters        Return parameters
  1606.     D1               D1    ?
  1607.     D2               D2    preserved
  1608.     D3.W timeout           D3    preserved
  1609.     A0.L channel ID        A0    preserved
  1610.     A1               A1    ?
  1611.     A2               A2    preserved
  1612.     A3               A3    preserved
  1613.     Errors : NC,NO
  1614.  
  1615.      D0=$24 SD.CLRRT    clears the right hand end of the cursor line
  1616.     Call parameters        Return parameters
  1617.     D1               D1    ?
  1618.     D2               D2    preserved
  1619.     D3.W timeout           D3    preserved
  1620.     A0.L channel ID        A0    preserved
  1621.     A1               A1    ?
  1622.     A2               A2    preserved
  1623.     A3               A3    preserved
  1624.     Errors : NC,NO
  1625.  
  1626.      D0=$25 SD.FOUNT    sets or resets the character fount
  1627.     Call parameters        Return parameters
  1628.     D1               D1    ?
  1629.     D2               D2    preserved
  1630.     D3.W timeout           D3    preserved
  1631.     A0.L channel ID        A0    preserved
  1632.     A1   base of font       A1    ?
  1633.     A2   base of second font   A2    preserved
  1634.     A3               A3    preserved
  1635.     Errors : NC,NO
  1636.     Format of Font:
  1637.        $00        lowest valid character
  1638.        $01        number of valid characters-1
  1639.        $02..$0A 9 bytes of pixels for 1st character
  1640.        $0B..$13 9 bytes of pixels ...
  1641.  
  1642.      D0=$26 SD.RECOL    recolours a window
  1643.     Call parameters        Return parameters
  1644.     D1               D1    ?
  1645.     D2               D2    preserved
  1646.     D3.W timeout           D3    preserved
  1647.     A0.L channel ID        A0    preserved
  1648.     A1   ptr to colour list    A1    ?
  1649.     A2               A2    preserved
  1650.     A3               A3    preserved
  1651.     Errors : NC,NO
  1652.     The colour list consists of 8 bytes, which contain the new
  1653.     colour for each old colour
  1654.  
  1655.      D0=$27 SD.SETPA    sets Paper colour
  1656.     Call parameters        Return parameters
  1657.     D1.B colour           D1    ?
  1658.     D2               D2    preserved
  1659.     D3.W timeout           D3    preserved
  1660.     A0.L channel ID        A0    preserved
  1661.     A1               A1    ?
  1662.     A2               A2    preserved
  1663.     A3               A3    preserved
  1664.     Errors : NC,NO
  1665.  
  1666.      D0=$28 SD.SETST    sets Strip colour
  1667.     Call parameters        Return parameters
  1668.     D1.B colour           D1    ?
  1669.     D2               D2    preserved
  1670.     D3.W timeout           D3    preserved
  1671.     A0.L channel ID        A0    preserved
  1672.     A1               A1    ?
  1673.     A2               A2    preserved
  1674.     A3               A3    preserved
  1675.     Errors : NC,NO
  1676.  
  1677.      D0=$29 SD.SETIN    sets ink colour
  1678.     Call parameters        Return parameters
  1679.     D1.B colour           D1    ?
  1680.     D2               D2    preserved
  1681.     D3.W timeout           D3    preserved
  1682.     A0.L channel ID        A0    preserved
  1683.     A1               A1    ?
  1684.     A2               A2    preserved
  1685.     A3               A3    preserved
  1686.     Errors : NC,NO
  1687.  
  1688.      D0=$2A SD.SETFL    sets flashing
  1689.     Call parameters        Return parameters
  1690.     D1.B flash attribute       D1    ?
  1691.     D2               D2    preserved
  1692.     D3.W timeout           D3    preserved
  1693.     A0.L channel ID        A0    preserved
  1694.     A1               A1    ?
  1695.     A2               A2    preserved
  1696.     A3               A3    preserved
  1697.     Errors : NC,NO
  1698.  
  1699.      D0=$2B SD.SETUL    sets Underlining
  1700.     Call parameters        Return parameters
  1701.     D1.B underline attribute   D1    ?
  1702.     D2               D2    preserved
  1703.     D3.W timeout           D3    preserved
  1704.     A0.L channel ID        A0    preserved
  1705.     A1               A1    ?
  1706.     A2               A2    preserved
  1707.     A3               A3    preserved
  1708.     Errors : NC,NO
  1709.  
  1710.      D0=$2C SD.SETMD    sets character writing or plotting mode
  1711.     Call parameters        Return parameters
  1712.     D1.W mode           D1    ?
  1713.     D2               D2    preserved
  1714.     D3.W timeout           D3    preserved
  1715.     A0.L channel ID        A0    preserved
  1716.     A1               A1    ?
  1717.     A2               A2    preserved
  1718.     A3               A3    preserved
  1719.     Errors : NC,NO
  1720.     modes: -1=XOR , 0=Ink on strip , 1=ink on transparent
  1721.  
  1722.      D0=$2D SD.SETSZ    set character size and spacing
  1723.     Call parameters        Return parameters
  1724.     D1.W char width/spacing    D1    ?
  1725.     D2.W char height/spacing   D2    preserved
  1726.     D3.W timeout           D3    preserved
  1727.     A0.L channel ID        A0    preserved
  1728.     A1               A1    ?
  1729.     A2               A2    preserved
  1730.     A3               A3    preserved
  1731.     Errors : NC,NO
  1732.     D1 = 0..3 (5 in 6, 5 in 8 , 10 in 12, 10 in 16)
  1733.     D2 = 0..1 (9 in 10 , 18 in 20)
  1734.  
  1735.      D0=$2E SD.FILL    fills a rectangular block within a window
  1736.     Call parameters        Return parameters
  1737.     D1.B colour           D1    ?
  1738.     D2               D2    preserved
  1739.     D3.W timeout           D3    preserved
  1740.     A0.L channel ID        A0    preserved
  1741.     A1   ptr to block def       A1    ?
  1742.     A2               A2    preserved
  1743.     A3               A3    preserved
  1744.     Errors : NC,NO
  1745.     0(A1) = width in pixel
  1746.     2(A1) = height in pixel
  1747.     4(A1) = X origin (relative to window)
  1748.     6(A1) = Y origin
  1749.  
  1750.      D0=$2F illegal system call
  1751.      D0=$30 SD.POINT    plots a point
  1752.     Call parameters        Return parameters
  1753.     D1               D1    ?
  1754.     D2               D2    preserved
  1755.     D3.W timeout           D3    preserved
  1756.     A0.L channel ID        A0    preserved
  1757.     A1   arithmetic stack ptr  A1    ?
  1758.     A2               A2    preserved
  1759.     A3               A3    preserved
  1760.     Errors : NC,NO
  1761.     0(A1) = Y coordinate (6 byte Float)
  1762.     6(A1) = X coordinate
  1763.  
  1764.      D0=$31 SD.LINE    plots a line
  1765.     Call parameters        Return parameters
  1766.     D1               D1    ?
  1767.     D2               D2    preserved
  1768.     D3.W timeout           D3    preserved
  1769.     A0.L channel ID        A0    preserved
  1770.     A1   arithmetic stack ptr  A1    ?
  1771.     A2               A2    preserved
  1772.     A3               A3    preserved
  1773.     Errors : NC,NO
  1774.     0(A1) = Y coordinate end of line (6 byte Float)
  1775.     6(A1) = X coordinate EOL
  1776.     C(A1) = Y start
  1777.     12(A1) = X start
  1778.  
  1779.      D0=$32 SD.ARC    plots an arc
  1780.     Call parameters        Return parameters
  1781.     D1               D1    ?
  1782.     D2               D2    preserved
  1783.     D3.W timeout           D3    preserved
  1784.     A0.L channel ID        A0    preserved
  1785.     A1   arithmetic stack ptr  A1    ?
  1786.     A2               A2    preserved
  1787.     A3               A3    preserved
  1788.     Errors : NC,NO
  1789.     0(A1) = angle (6 byte Float)
  1790.     6(A1) = Y end
  1791.     C(A1) = X end
  1792.     12(A1) = Y start
  1793.     18(A1) = X start
  1794.  
  1795.      D0=$33 SD.ELLIPS    plots an ellipse
  1796.     Call parameters        Return parameters
  1797.     D1               D1    ?
  1798.     D2               D2    preserved
  1799.     D3.W timeout           D3    preserved
  1800.     A0.L channel ID        A0    preserved
  1801.     A1   arithmetic stack ptr  A1    ?
  1802.     A2               A2    preserved
  1803.     A3               A3    preserved
  1804.     Errors : NC,NO
  1805.     0(A1) = angle (6 byte Float)
  1806.     6(A1) = radius
  1807.     C(A1) = eccentricity
  1808.     12(A1) = Y centre
  1809.     18(A1) = X centre
  1810.  
  1811.      D0=$34 SD.SCALE    sets window scale
  1812.     Call parameters        Return parameters
  1813.     D1               D1    ?
  1814.     D2               D2    preserved
  1815.     D3.W timeout           D3    preserved
  1816.     A0.L channel ID        A0    preserved
  1817.     A1   arithmetic stack ptr  A1    ?
  1818.     A2               A2    preserved
  1819.     A3               A3    preserved
  1820.     Errors : NC,NO
  1821.     0(A1) = Y coordinate bottom line (6 byte Float)
  1822.     6(A1) = X coordinate left hand pixel
  1823.     C(A1) = length of Y axis
  1824.  
  1825.      D0=$35 SD.FLOOD    turns area flood on and off
  1826.     Call parameters        Return parameters
  1827.     D1.L 0/1           D1    ?
  1828.     D2               D2    preserved
  1829.     D3.W timeout           D3    preserved
  1830.     A0.L channel ID        A0    preserved
  1831.     A1               A1    ?
  1832.     A2               A2    preserved
  1833.     A3               A3    preserved
  1834.     Errors : NC,NO
  1835.  
  1836.      D0=$36 SD.GCUR    sets graphics cursor position
  1837.     Call parameters        Return parameters
  1838.     D1               D1    ?
  1839.     D2               D2    preserved
  1840.     D3.W timeout           D3    preserved
  1841.     A0.L channel ID        A0    preserved
  1842.     A1   arithmetic stack ptr  A1    ?
  1843.     A2               A2    preserved
  1844.     A3               A3    preserved
  1845.     Errors : NC,NO
  1846.     0(A1) = grafics X coordinate (6 byte Float)
  1847.     6(A1) = grafics Y coordinate
  1848.     C(A1) = pixel offset to the right
  1849.     12(A1) = piixel offset downwards
  1850.  
  1851.      D0=$37 illegal system call
  1852.      D0=$38 illegal system call
  1853.      D0=$39 illegal system call
  1854.      D0=$3A illegal system call
  1855.      D0=$3B illegal system call
  1856.      D0=$3C illegal system call
  1857.      D0=$3D illegal system call
  1858.      D0=$3E illegal system call
  1859.      D0=$3F illegal system call
  1860.      D0=$40 FS.CHECK    checks all pending operations on a file
  1861.     Call parameters        Return parameters
  1862.     D1               D1    ?
  1863.     D2               D2    preserved
  1864.     D3.W timeout           D3    preserved
  1865.     A0.L channel ID        A0    preserved
  1866.     A1               A1    ?
  1867.     A2               A2    preserved
  1868.     A3               A3    preserved
  1869.     Errors : NC,NO
  1870.  
  1871.      D0=$41 FS.FLUSH    flushes buffer for file
  1872.     Call parameters        Return parameters
  1873.     D1               D1    ?
  1874.     D2               D2    preserved
  1875.     D3.W timeout           D3    preserved
  1876.     A0.L channel ID        A0    preserved
  1877.     A1               A1    ?
  1878.     A2               A2    preserved
  1879.     A3               A3    preserved
  1880.     Errors : NC,NO
  1881.  
  1882.      D0=$42 FS.POSAB    position file pointer absolute
  1883.     Call parameters        Return parameters
  1884.     D1.L position in file       D1    ?
  1885.     D2               D2    preserved
  1886.     D3.W timeout           D3    preserved
  1887.     A0.L channel ID        A0    preserved
  1888.     A1               A1    ?
  1889.     A2               A2    preserved
  1890.     A3               A3    preserved
  1891.     Errors : NC,NO,EF
  1892.  
  1893.      D0=$43 FS.POSRE    position file pointer relative
  1894.     Call parameters        Return parameters
  1895.     D1.L offset to file ptr    D1    ?
  1896.     D2               D2    preserved
  1897.     D3.W timeout           D3    preserved
  1898.     A0.L channel ID        A0    preserved
  1899.     A1               A1    ?
  1900.     A2               A2    preserved
  1901.     A3               A3    preserved
  1902.     Errors : NC,NO,EF
  1903.  
  1904.      D0=$44 illegal system call
  1905.      D0=$45 FS.MDINF    Gets information about storage medium
  1906.     Call parameters        Return parameters
  1907.     D1               D1    empty/good sectors
  1908.     D2               D2    preserved
  1909.     D3.W timeout           D3    preserved
  1910.     A0.L channel ID        A0    preserved
  1911.     A1   ptr to 10 byte buffer A1    end of medium name
  1912.     A2               A2    preserved
  1913.     A3               A3    preserved
  1914.     Errors : NC,NO
  1915.  
  1916.      D0=$46 FS.HEADS    sets the file header
  1917.     Call parameters        Return parameters
  1918.     D1               D1    lenght of header set
  1919.     D2               D2    preserved
  1920.     D3.W timeout           D3    preserved
  1921.     A0.L channel ID        A0    preserved
  1922.     A1   base of header block  A1    end of header definition
  1923.     A2               A2    preserved
  1924.     A3               A3    preserved
  1925.     Errors : NC,NO
  1926.     00 file length
  1927.     04 file access
  1928.     05 file type (0=data , 1=executable)
  1929.     06 8 byte type dependent information (size of dataspace)
  1930.     0E length of file name
  1931.     10 up to 36 characters of file name
  1932.     34 date information
  1933.  
  1934.      D0=$47 FS.HEADR    reads the file header
  1935.     Call parameters        Return parameters
  1936.     D1               D1    ?
  1937.     D2.W bufer length       D2    preserved
  1938.     D3.W timeout           D3    preserved
  1939.     A0.L channel ID        A0    preserved
  1940.     A1   ptr to read buffer    A1    ?
  1941.     A2               A2    preserved
  1942.     A3               A3    preserved
  1943.     Errors : NC,NO,BO
  1944.  
  1945.      D0=$48 FS.LOAD    loads a file into memory
  1946.     Call parameters        Return parameters
  1947.     D1               D1    ?
  1948.     D2.L length of file       D2    preserved
  1949.     D3.W timeout           D3    preserved
  1950.     A0.L channel ID        A0    preserved
  1951.     A1   address for load       A1    top address after load
  1952.     A2               A2    preserved
  1953.     A3               A3    preserved
  1954.     Errors : NO
  1955.  
  1956.      D0=$49 FS.SAVE    saves a file from memory
  1957.     Call parameters        Return parameters
  1958.     D1               D1    ?
  1959.     D2.L length of file       D2    preserved
  1960.     D3.W timeout           D3    preserved
  1961.     A0.L channel ID        A0    preserved
  1962.     A1   ptr to data       A1    top address of file
  1963.     A2               A2    preserved
  1964.     A3               A3    preserved
  1965.     Errors : DF,NO
  1966.  
  1967.   e) relative to A6 TRAP (#4)
  1968.     makes the next IO trap relative to A6 (for BASIC)
  1969.  
  1970.   f) Vectored utilities
  1971.      Vectored utilities [ MOVEA.W $???,An      JSR (An)]
  1972.  
  1973.      0C0 MM.ALCHP allocate common heap (D1)
  1974.      0C2 MM.RECHP release common heap
  1975.      0C4 UT.WINDW Set up window
  1976.      0C6 UT.CON   set up a console window
  1977.      0C8 UT.SCR   set up screen window
  1978.      0CA UT.ERR0  write error message to #0
  1979.      0CC UT.ERR   write error message to a channel
  1980.      0CE UT.MINT  convert integer to ASCII
  1981.      0D0 UT.MTEXT send message to a channel
  1982.      0D2 UT.LINK  link intem into list
  1983.      0D4 UT.UNLNK unlink item from list
  1984.      0D6 illegal  Vector !
  1985.      0D8 MM.ALLOC allocate area in a  heap
  1986.      0DA MM.LNKFR Links free space into heap
  1987.      0DC IO.QSET  set up a queue
  1988.      0DE IO.QTEST test queue status
  1989.      0E0 IO.QIN   put byte into a queue
  1990.      0E2 IO.QOUT  Extract a byte frrom a queue
  1991.      0E4 IO.QEOF  put EOF marker into queue
  1992.      0E6 UT.CSTR  compare two strings
  1993.      0E8 IO.SERQ  direct queue handling
  1994.      0EA IO.SERIO General IO handling
  1995.      0EC CN.DATE  get date and time
  1996.      0EE CN.DAY   get day of week
  1997.      0F0 CN.FTOD  convert float to ASCII
  1998.      0F2 CN.ITOD  convert Integer to ASCII
  1999.      0F4 CN.ITOBB convert binary byte to ASCII
  2000.      0F6 CN.ITOBW convert binary word to ASCII
  2001.      0F8 CN.ITOBL convert binary long word to ASCII
  2002.      0FA CN.ITOHB convert hex byte to ASCII
  2003.      0FC CN.ITOHW convert hex word to ASCII
  2004.      0FE CN.ITOHL convert hex long word to ASCII
  2005.      100 CN.DTOF  convert ASCII to float
  2006.      102 CN.DTOI  convert ASCII to integer
  2007.      104 CN.BTOIB convert ASCII to binary byte
  2008.      106 CN.BTOIW convert ASCII to binary word
  2009.      108 CN.BTOIL convert ASCII to binary long word
  2010.      10A CN.HTOIB convert ASCII to hex byte
  2011.      10C CN.HTOIW convert ASCII to hex word
  2012.      10E CN.HTOIL convert ASCII to hex long word
  2013.      110 BP.INIT  basic procedure initialization
  2014.      112 CA.GTINT Get integers from basic
  2015.      114 CA.GTFP  Get floats from basic
  2016.      116 CA.GTSTR Get strings from basic
  2017.      118 CA.GTLIN Get long integers from basic
  2018.      11A BV.CHRIX reserve space on arithmetic stack
  2019.      11C RI.EXEC  Executes an arithmetic operation
  2020.      11E RI.EXECB execute list of arithmetic operations
  2021.      120 BP.LET   return basic parameter value
  2022.      122 IO.NAME  decode a device name
  2023.      124 MD.READ  read a sector on a microdrive
  2024.      126 MD.WRITE write a sector on a microdrive
  2025.      128 MD.VERIN verify a sector on a microdrrive
  2026.      12A MD.SECTR read a sector header on a microdrive
  2027.      12C ANA_SYNX basic syntax analyser
  2028.      12E TB_LIST  first syntax table
  2029.      130 EXP_SYNX expression syntax table
  2030.      132 FMT_LINE format precompiled line
  2031.      134 COMP_ERR error when compiling
  2032.      136 STO_LINE store precompiled line
  2033.      138 TKN_LIST convert precompiled line to ASCII
  2034.      13A INI_STCK initialize basic stacks
  2035.  
  2036.   g) System Variables ($28000+??)
  2037.      00 SV.IDENT Identification
  2038.      04 SV.CHEAP Base of common heap
  2039.      08 SV.CHPFR First free space in common heap
  2040.      0C SV.FREE  Base of free area
  2041.      10 SV.BASIC Base of BASIC stack
  2042.      14 SV.TRNSP Base of transient program area
  2043.      18 SV.TRNFR First free space in TPA
  2044.      1C SV.RESPR Base of RESPR
  2045.      20 SV.RAMT  Top of RAM(+1)
  2046.      2E SV.RAND  Random number(constantly changing)
  2047.      30 SV.POLLM Count of poll interrupts missed
  2048.      32 SV.TVMOD 0 if not TV display
  2049.      34 SV.MCSTA MC status register
  2050.      35 SV.PCINT PC interrupt register
  2051.      37 SV.NETNR Network station number
  2052.      38 SV.I2LST list of INT2 drivers
  2053.      3C SV.PLIST list of 50 Hz routines
  2054.      40 SV.SHLIST List of scheduler tasks
  2055.      44 SV.DRLST list of device drivers
  2056.      48 SV.DDLST list of directory device drivers
  2057.      4C SV.KEYQ  keyboard queue
  2058.      50 SV.TRAPV trap redirection table
  2059.      54 SV.BTPNT most recent slave block entry
  2060.      58 SV.BTBAS base of slave block table
  2061.      5C SV.BTTOP top of slave block table
  2062.      60 SV.JBTAG Current value of job tag
  2063.      62 SV.JBMAX Highest current job number
  2064.      64 SV.JBPNT current job table entry
  2065.      68 SV.JBBAS base of job table
  2066.      6C SV.JBTOP top of job table
  2067.      70 SV.CHTAG value of channel tag
  2068.      72 SV.CHMAX current channel number
  2069.      74 SV.CHPNT Pointer to last channel checked
  2070.      78 SV.CHBAS Pointer to base of channel table
  2071.      7C SV.CHTOP Pointer to top of channel table
  2072.      88 SV.CAPS  Caps lock
  2073.      8A SV.ARBUF Auto repeat buffer
  2074.      8C SV.ARDEL Autorepeat delay
  2075.      8E SV.ARFRQ Autorepeat 1/frequency
  2076.      90 SV.ARCNT Autorepeat count
  2077.      92 SV.CQCH  Taskswitch character(^C)
  2078.      94 SV.WP     Write protect
  2079.      96 SV.SOUND Sound status
  2080.      98 SV.SER1C SER1 queue address
  2081.      9C SV.SER2C SER2 queue address
  2082.      A0 SV.TMODE ZX8032 transmit mode
  2083.      A2 SV.CSUB  CAPSLOCK routine ! now changed to Clock offset !
  2084.      A6 SV.TIMO  Timeout for transmit
  2085.      A8 SV.TIMOV Value of switching timeout (2 chars.)
  2086.      AA SV.FSTAT Flashing cursor status
  2087.  
  2088.   h) Basic Variables (??(A6))
  2089.      00 BV.BFBAS buffer base
  2090.      04 BV.BFP     buffer running pointer
  2091.      08 BV.TKBAS token list
  2092.      0C BV.TKP     token list running pointer
  2093.      10 BV.PFBAS program file
  2094.      14 BV.PFP     program running pointer
  2095.      18 BV.NBAS  name table
  2096.      1C BV.NTP     name table running pointer
  2097.      20 BV.NLBAS name list
  2098.      24 BV.NLP     name list running pointer
  2099.      28 BV.VVBAS variable values
  2100.      2C BV.VVP     variable values running pointer
  2101.      30 BV.CHBAS channel name
  2102.      34 BV.CHP     channel name running pointer
  2103.      38 BV.RTBAS return table
  2104.      3C BV.RTP     return table running pointer
  2105.      40 BV.LNBAS line number table
  2106.      44 BV.LNP     line number running pointer
  2107.      48 BV.BTP     backtrack stack
  2108.      4C BV.BTBAS backtrack running pointer
  2109.      50 BV.TGP     temporary graph stack
  2110.      54 BV.TGBAS graph stack running pointer
  2111.      58 BV.RIP     arithmetic stack
  2112.      5C BV.RIBAS arithmetic stack running pointer
  2113.      60 BV.SSP     system stack
  2114.      64 BV.SSBAS system stack running pointer
  2115.      68 BV.LINUM current line number
  2116.      6A BV.LENGTH current length
  2117.      6C BV.STMNT current statement on line
  2118.      6D BV.CONT  continue ($80) or stop (0) processing
  2119.      6E BV.INLIN Processing in the line clause or not
  2120.      6F BV.SING  Single line execution ON ($FF) or OFF (0)
  2121.      70 BV.INDEX Name tab row of last inlin lp index read
  2122.      72 BV.VVFREE First free space in vvtable
  2123.      76 BV.SSSAV Saved sp for out/mem to back to
  2124.      80 BV.RAND  Random number
  2125.      84 BV.COMCH Command channel
  2126.      88 BV.NXLIN Which line number to start after
  2127.      8A BV.NXSTM Which statement to start after
  2128.      8B BV.COMLN Command line saved ($ff) or not (0)
  2129.      8C BV.STOPN Which stop number set
  2130.      8E BV.EDIT  Program has been edited ($ff) or not (0)
  2131.      8F BV.BRK     There has been a break (0) or not ($80)
  2132.      90 BV.UNRVL Need to unravel ($ff) or not (0)
  2133.      91 BV.CNSTM Statement to CONTINUE from
  2134.      92 BV.CNLND Line to CONTINUE from
  2135.      94 BV.DALNO Current DATA line number
  2136.      96 BV.DASTM Current DATA statement number
  2137.      97 BV.DAITM Next DATA item to read
  2138.      98 BV.CNIND Inline loop index to CONTINUE with
  2139.      9A BV.CNINL Inline loop flag for CONTINUE
  2140.      9B BV.LSANY Whether checking list ($ff) or not (0)
  2141.      9C BV.LSBEF Invisible top line
  2142.      9E BV.LSBAS Bottom line in window
  2143.      A0 BV.LSAFT Invisible bottom line
  2144.      A2 BV.LENLN Length of window line
  2145.      A4 BV.MAXLN Max. number of window lines
  2146.      A6 BV.TOTLN Number of window line so far
  2147.      AA BV.AUTO  Whether AUTO/EDIT is on ($FF) or off (0)
  2148.      AB BV.PRINT Print from prtok ($ff) or leave in buffer
  2149.      AC BV.EDLIN Line number to edit next
  2150.      AE BV.EDINC Increment on edit range
  2151.      E0      Toolkit 2 ALCHP
  2152.      EC      QLIB_RUN
  2153.  
  2154.   i) error codes and messages
  2155.      Errors are returned in D0 throughout the whole system.
  2156.      If D0 is set to 0, then no error has occured. Any negative number
  2157.      means that the operation has errored.
  2158.      -1   ERR.NC  Not complete
  2159.      -2   ERR.NJ  Invalid Job
  2160.      -3   ERR.OM  out of memory
  2161.      -4   ERR.OR  out of range
  2162.      -5   ERR.BO  Buffer full
  2163.      -6   ERR.NO  Channel not open
  2164.      -7   ERR.NF  Not found
  2165.      -8   ERR.EX  already exists
  2166.      -9   ERR.IU  in use
  2167.      -10  ERR.EF  end of file
  2168.      -11  ERR.DF  drive full
  2169.      -12  ERR.BN  bad name
  2170.      -13  ERR.TE  Xmit error
  2171.      -14  ERR.FF  Format failed
  2172.      -15  ERR.BP  bad parameter
  2173.      -16  ERR.FE  bad medium
  2174.      -17  ERR.XP  error in expression
  2175.      -18  ERR.OV  overflow
  2176.      -19  ERR.NI  not implemented
  2177.      -20  ERR.RO  read only
  2178.      -21  ERR.BL  bad line
  2179.  
  2180. !! Excuse me, I give up here. Anybody, who is interested is invited
  2181. !! to complete this Manual and send the updated Version to me.
  2182.  
  2183.   j) Channel definition block
  2184.  
  2185.   k) File system channel definition block
  2186.  
  2187.   l) Job control block
  2188.  
  2189.   m) common heap header
  2190.  
  2191.   n) Window block definition
  2192.  
  2193.